package com.ipartek.pruebas.bbddaccessP1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MYSQLDAOFactoryP1 extends DAOFactoryP1{

	public MYSQLDAOFactoryP1(){
		try{
		Class.forName("com.mysql.jdbc.Driver");
		}catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
	
	public static Connection getConnection(){
		Connection con = null;
		try{
			con = DriverManager.getConnection("jdbc:mysql://localhost/prueba", "root", "cosita");
		}catch(SQLException e){
			e.printStackTrace();
		}
		return con;
	}
	
	@Override
	public AlumnoDAOP1 getAlumno() {
		return new AlumnoMYSQLDAOP1();
	}

	@Override
	public CursoDAOP1 getCurso() {
		// TODO Auto-generated method stub
		return null;
	}

}
